home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ntkb.zip / NTKB.EXE / Q106 / 1 / 02.TXT next >
Text File  |  1993-11-16  |  3KB  |  83 lines

  1. DOCUMENT:Q106102  05-NOV-1993  [W_NT]
  2. TITLE   :Environment Vars in Logon Scripts on a Non-Windows NT Client
  3. PRODUCT :Windows NT
  4. PROD/VER:3.10
  5. OPER/SYS:WINDOWS
  6. KEYWORDS:
  7.  
  8. ------------------------------------------------------------------
  9. The information in this article applies to:
  10.  
  11.  - Microsoft Windows NT operating system version 3.1
  12.  - Microsoft Windows NT Advanced Server version 3.1
  13. ------------------------------------------------------------------
  14.  
  15. SUMMARY
  16. =======
  17.  
  18. If you use Windows NT system environment variables in a logon script,
  19. those environment variables will not be correctly resolved when you
  20. attempt to log on to a non-Windows NT client.
  21.  
  22. MORE INFORMATION
  23. ================
  24.  
  25. Windows NT allows you to specify a logon script as part of the profile
  26. for each user name account on the domain and on the local computer.
  27. Each time an attempt is made to log on with a particular user name,
  28. the user name's associated logon script will execute. Within the logon
  29. script, you may include Windows NT system environment variables.
  30. However, if you attempt to log on to a Windows NT Advanced
  31. Server-based domain from a non-Windows NT client, any Windows NT
  32. system environment variables contained within the logon script will
  33. not be resolved on the non-Windows NT client. This is expected
  34. behavior because the Windows NT system environment variables are not
  35. defined on the non-Windows NT client.
  36.  
  37. Steps to Reproduce Problem
  38. --------------------------
  39.  
  40. 1. Create the following logon script in any text editor and save it as
  41.    TSTSCRPT.BAT:
  42.  
  43.       echo off
  44.       echo hello %USERNAME%
  45.       echo thank you for logging on to %USERDOMAIN%
  46.       pause
  47.  
  48. 2. Using User Manager for Domains on a Windows NT Advanced Server
  49.    Domain Controller, create a domain user account called 'Test' and
  50.    modify the profile so that TSTSCRPT.BAT is specified as the Logon
  51.    Script Name.
  52.  
  53. 3. Log on to the domain from a client computer running a non-Windows
  54.    NT networking operating system, such as LAN Manager or Windows for
  55.    Workgroups 3.1. The logon script will execute and the following will
  56.    be displayed on the screen:
  57.  
  58.       hello
  59.       thank you for logging on to
  60.       Press any key to continue...
  61.  
  62. The environment variables %USERNAME% and %USERDOMAIN% will not be
  63. resolved, thus leaving no information on the screen for those values.
  64.  
  65. Additional reference words: 3.10
  66. KBCategory:
  67. KBSubCategory: ntap netsrv
  68.  
  69. =============================================================================
  70.  
  71. THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
  72. PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS
  73. ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES
  74. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  75. EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR
  76. ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
  77. CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF
  78. MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
  79. POSSIBILITY OF SUCH DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION
  80. OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES
  81. SO THE FOREGOING LIMITATION MAY NOT APPLY.
  82.  
  83. Copyright Microsoft Corporation 1993.